﻿<Window
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    x:Class="SIPSorcery.SoftPhone.SoftPhone"
    Title="SIPSorcery SoftPhone" Width="676" Background="#FF808080" HorizontalAlignment="Left"  mc:Ignorable="d" Closing="Window_Closing" Icon="favicon.ico" MinHeight="435" Height="435" MinWidth="676" Loaded="OnWindowLoaded">
    <StackPanel>
        
		<Border x:Name="_statusBorder" BorderBrush="#FF807FC3" BorderThickness="2" Margin="2" CornerRadius="3" VerticalAlignment="Top" Height="32" Background="#FFCCD0EA">
			<TextBlock x:Name="m_signallingStatus" TextWrapping="Wrap" Margin="2" Background="#FFCCD0EA" Text="Ready" VerticalAlignment="Center"/>
		</Border>
        
		<Grid Margin="1.333,0,6.667,0" VerticalAlignment="Top" Height="35.8" x:Name="m_uacGrid">
			<Button x:Name="m_cancelButton" Content="Cancel" Click="CancelButton_Click" HorizontalAlignment="Right" Width="64" Margin="0,-0.203,8,0.203"/>
			<Button x:Name="m_byeButton" Content="Bye" Click="ByeButton_Click" HorizontalAlignment="Right" Width="64" Margin="0,-0.203,8,0.203"/>
			<Button HorizontalAlignment="Right" x:Name="m_callButton" Width="64" Content="Call" Click="CallButton_Click" Margin="0,-0.203,8,0.203"/>
			<TextBox FontSize="16" Margin="10,5,77.2,3" x:Name="m_uriEntryTextBox" TextWrapping="Wrap"/>
		</Grid>
		<Grid Margin="2" x:Name="m_uasGrid" VerticalAlignment="Top" Height="31" d:IsHidden="True">
			<Button x:Name="m_hangupButton" Content="Hangup" Click="HangupButton_Click" HorizontalAlignment="Left" Margin="0,-0.203,0,0.203" Width="64"/>
			<Button x:Name="m_rejectButton" Content="Reject" Click="RejectButton_Click" HorizontalAlignment="Left" Margin="68,0,0,0" Width="64" IsCancel="False"/>
			<Button x:Name="m_answerButton" Content="Answer" Click="AnswerButton_Click" Margin="0,-0.203,0,0.203" HorizontalAlignment="Left" Width="64"/>
			<Button x:Name="m_redirectButton" Content="Redirect" Click="RedirectButton_Click" Margin="136,-0.203,0,0.203" HorizontalAlignment="Left" Width="64" IsCancel="False"/>
			<TextBox FontSize="16" Margin="204,0,8,0" x:Name="m_redirectURIEntryTextBox" TextWrapping="Wrap"/>
		</Grid>

		<Grid x:Name="_videoControlsGrid" Margin="2" MinHeight="276">
			<Grid.ColumnDefinitions>
				<ColumnDefinition Width="*"/>
				<ColumnDefinition Width="*"/>
			</Grid.ColumnDefinitions>
			<Grid.RowDefinitions>
				<RowDefinition Height="*" />
				<RowDefinition Height="30" />
			</Grid.RowDefinitions>
			<StackPanel Grid.Column="0">
				<Border BorderBrush="#FF807FC3" BorderThickness="2" CornerRadius="2">
					<Image x:Name="_localVideo" MinWidth="320" MinHeight="240"/>
				</Border>
				<Border x:Name="_localVideoStatusBorder"  BorderBrush="#FFE87A1E" BorderThickness="2" CornerRadius="3" Background="#FFF3F1EF" Margin="2,0"  MouseUp="HideLocalVideoError" Visibility="Collapsed">
					<TextBlock x:Name="_localVideoStatus" TextWrapping="Wrap" Margin="2" Background="#FFF3F1EF" Text="Local Video Error" VerticalAlignment="Center"/>
				</Border>
			</StackPanel>
			<StackPanel Grid.Column="1">
				<Border BorderBrush="#FF807FC3" BorderThickness="2" CornerRadius="2">
					<Image x:Name="_remoteVideo" MinWidth="320" MinHeight="240"/>
				</Border>
				<Border x:Name="_remoteVideoStatusBorder"  BorderBrush="#FFE87A1E" BorderThickness="2" CornerRadius="3" Background="#FFF3F1EF" Margin="2,0" MouseUp="HideRemoteVideoError" Visibility="Collapsed">
					<TextBlock x:Name="_remoteVideoStatus" TextWrapping="Wrap" Margin="2" Background="#FFF3F1EF" Text="Remote Video Error" VerticalAlignment="Center"/>
				</Border>
			</StackPanel>
			<Button x:Name="_startLocalVideoButton" Content="Start" HorizontalAlignment="Left" Height="30" Margin="219,0,0,0" VerticalAlignment="Center" Width="50" Grid.Row="1" Click="StartLocalVideo" IsEnabled="False" />
			<Button x:Name="_stopLocalVideoButton" Content="Stop" HorizontalAlignment="Left" Height="30" Margin="277,0,0,0" VerticalAlignment="Center" Width="50" Grid.Row="1" IsEnabled="False" Click="StopLocalVideo" />
			<ComboBox x:Name="_localVideoDevices" DisplayMemberPath="Key" SelectedValuePath="Value" HorizontalAlignment="Left" Height="30" Grid.Row="1" VerticalAlignment="Center" Width="211" IsEnabled="False" SelectionChanged="VideoDeviceChanged" VerticalContentAlignment="Center"/>
		</Grid>
	</StackPanel>
</Window>
